package com.yizhuoyan.his.webapi.controller.pharmacyoperator.vo;

import com.yizhuoyan.his.entity.DocPrescriptionDetailEntity;
import com.yizhuoyan.his.entity.DocPrescriptionEntity;
import com.yizhuoyan.his.entity.HosDrugsEntity;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class DrugSendBackVo {

    //发药状态
    private  int state;
    //退药金额
    private double money;
    //药品名称
    private String drugName;
    //药品数量
    private double count;
    //可退数量
    private double sendBackCount;
    //药品单价
    private double price;
    public  static DrugSendBackVo of(HosDrugsEntity entity, DocPrescriptionDetailEntity entity1,double money,List<DocPrescriptionEntity> docPrescriptionEntities){
      DrugSendBackVo vo = new DrugSendBackVo();
      vo.setCount(entity1.getAmount());
      vo.setDrugName(entity.getName());
      vo.setMoney(money);
      vo.setPrice(entity.getUnitPrice());
      vo.setSendBackCount(entity1.getAmount());
      vo.setState(entity1.getState());
      return  vo;
  }
}
